package com.maserb.monitor.service.common;

import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public interface FileService {
    String getUploadDir();

    String upload(MultipartFile multipartFile) throws IOException;

    String uploadHead(MultipartFile multipartFile,String schoolId,String studentId) throws IOException;

    ResponseEntity<byte[]> downloadImage(String relativePath) throws Exception;

    ResponseEntity<byte[]> downloadFile(String relativePath) throws Exception;

    void downloadAudio(String relativePath, HttpServletResponse response) throws Exception;

    void downloadFileByUrl(HttpServletRequest request, HttpServletResponse response, String filename )throws Exception;
}